
# json中的load方法
"""
load() : 将json文件中的内容读取出来变为python对象
"""
import json
#
# with open('test_data.json',encoding='utf-8') as f:
#     result = json.load(f)
#     print("从json文件中读取后转变为Python数据类型:{}".format(type(result)))
#     print(result)

with open('test_data.json',encoding='utf-8') as f:
    result = f.read()
    print("从json文件中读取的数据类型为:{}".format(type(result)))
    print(result)

    res1 = json.loads(result)
    print(res1)